/*
 * @Author: wuqingchun
 * @Date: 2024-06-21 10:56:27
 * @Description: 错误码定义
 * @LastEditors: wuqingchun
 * @LastEditTime: 2024-06-29 17:13:46
 */
#ifndef __HTTP_ERROR_H__
#define __HTTP_ERROR_H__

#define HTTP_ERRNO(err) (-(err))

#define HTTP_OK                       HTTP_ERRNO(0)                   // 成功
#define HTTP_INVALID_PARAM            HTTP_ERRNO(1)                   // 无效参数
#define HTTP_OPEN_FILE_FAIL           HTTP_ERRNO(2)                   // 打开文件失败
#define HTTP_ALLOC_MEMORY_FAIL        HTTP_ERRNO(3)                   // 申请内存失败
#define HTTP_SYSCALL_FAIL             HTTP_ERRNO(4)                   // 系统调用失败
#define HTTP_INII_FAIL                HTTP_ERRNO(5)                   // 初始化失败
#define HTTP_INVALID_POLLER           HTTP_ERRNO(6)                   // 无效的调度器
#define HTTP_INVALID_EVENT            HTTP_ERRNO(7)                   // 无效的事件
#define HTTP_NOT_READY                HTTP_ERRNO(8)                   // 无效的事件
#define HTTP_AGAIN                    HTTP_ERRNO(9)                   // 无效的事件
#define HTTP_FAILED                   HTTP_ERRNO(10)                   // 无效的事件
#define HTTP_PARSE_INVALID_METHOD      10

#endif //__HTTP_ERROR_H__